package json;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class User {
    @JsonProperty("name")
    @JSONField(name = "name")
    @SerializedName(value = "name")
    @Sensitive(strategy = SensitiveStrategy.USERNAME)
    private String userName;
    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date birth;

    private List<String> like;
    private Sex sex;

    private Hobby hobby;

    @JsonProperty("UUID")
    private String UUID;
}

@Data
class Hobby {
    private String name;
}
